package com.xuecheng.auth.domain.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xuecheng.auth.domain.mapper.XcUserMapper;
import com.xuecheng.auth.domain.model.entity.XcUser;
import com.xuecheng.auth.domain.service.XcUserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author itcast
 */
@Slf4j
@Service("xcUserServiceImpl")
public class XcUserServiceImpl extends ServiceImpl<XcUserMapper, XcUser> implements XcUserService {

    @Autowired
    private XcUserMapper xcUserMapper;

    @Override
    public XcUser getByUsername(String s) {
        return lambdaQuery().eq(XcUser::getUsername, s)
                .one();
    }
}
